home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0159 / vb.zip / SEKNOBS.FRM < prev    next >
Text File  |  1995-12-17  |  16KB  |  512 lines

  1. VERSION 2.00
  2. Begin Form KnobDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Demo"
  6.    ClientHeight    =   4725
  7.    ClientLeft      =   2385
  8.    ClientTop       =   5625
  9.    ClientWidth     =   8025
  10.    Height          =   5085
  11.    Left            =   2325
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   315
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   535
  19.    Top             =   5325
  20.    Width           =   8145
  21.    Begin HScrollBar HScroll1 
  22.       Height          =   225
  23.       Index           =   3
  24.       Left            =   4800
  25.       Max             =   3
  26.       TabIndex        =   29
  27.       Top             =   2880
  28.       Width           =   2595
  29.    End
  30.    Begin HScrollBar HScroll1 
  31.       Height          =   225
  32.       Index           =   1
  33.       Left            =   4800
  34.       Max             =   150
  35.       Min             =   -150
  36.       TabIndex        =   28
  37.       Top             =   2280
  38.       Width           =   2595
  39.    End
  40.    Begin HScrollBar HScroll1 
  41.       Height          =   225
  42.       Index           =   0
  43.       Left            =   4800
  44.       Max             =   150
  45.       Min             =   -150
  46.       TabIndex        =   25
  47.       Top             =   1980
  48.       Width           =   2595
  49.    End
  50.    Begin CheckBox Check1 
  51.       BackColor       =   &H00C0C0C0&
  52.       Caption         =   "MouseControl"
  53.       FontBold        =   0   'False
  54.       FontItalic      =   0   'False
  55.       FontName        =   "MS Sans Serif"
  56.       FontSize        =   8.25
  57.       FontStrikethru  =   0   'False
  58.       FontUnderline   =   0   'False
  59.       Height          =   225
  60.       Left            =   3780
  61.       TabIndex        =   6
  62.       Top             =   3360
  63.       Width           =   1635
  64.    End
  65.    Begin TextBox Text1 
  66.       Height          =   585
  67.       Left            =   135
  68.       MultiLine       =   -1  'True
  69.       TabIndex        =   8
  70.       Text            =   "0,1000,  200,800,  150,700,  500,-600,  0,-500,  -500,-600,  -150,700,  -200,800"
  71.       Top             =   3975
  72.       Width           =   7740
  73.    End
  74.    Begin Frame Frame4 
  75.       BackColor       =   &H00C0C0C0&
  76.       Caption         =   "KnobColor"
  77.       FontBold        =   0   'False
  78.       FontItalic      =   0   'False
  79.       FontName        =   "MS Sans Serif"
  80.       FontSize        =   8.25
  81.       FontStrikethru  =   0   'False
  82.       FontUnderline   =   0   'False
  83.       Height          =   1275
  84.       Left            =   5790
  85.       TabIndex        =   18
  86.       Top             =   90
  87.       Width           =   1605
  88.       Begin Label HColors 
  89.          BackColor       =   &H00000000&
  90.          Height          =   225
  91.          Index           =   0
  92.          Left            =   450
  93.          TabIndex        =   0
  94.          Top             =   360
  95.          Width           =   225
  96.       End
  97.       Begin Label HColors 
  98.          BackColor       =   &H00808080&
  99.          Height          =   225
  100.          Index           =   5
  101.          Left            =   930
  102.          TabIndex        =   9
  103.          Top             =   570
  104.          Width           =   225
  105.       End
  106.       Begin Label HColors 
  107.          BackColor       =   &H00FFFFFF&
  108.          Height          =   225
  109.          Index           =   1
  110.          Left            =   690
  111.          TabIndex        =   7
  112.          Top             =   360
  113.          Width           =   225
  114.       End
  115.       Begin Label HColors 
  116.          BackColor       =   &H000000FF&
  117.          Height          =   225
  118.          Index           =   6
  119.          Left            =   450
  120.          TabIndex        =   1
  121.          Top             =   780
  122.          Width           =   225
  123.       End
  124.       Begin Label HColors 
  125.          BackColor       =   &H0000FF00&
  126.          Height          =   225
  127.          Index           =   2
  128.          Left            =   930
  129.          TabIndex        =   19
  130.          Top             =   360
  131.          Width           =   225
  132.       End
  133.       Begin Label HColors 
  134.          BackColor       =   &H0000FFFF&
  135.          Height          =   225
  136.          Index           =   7
  137.          Left            =   690
  138.          TabIndex        =   24
  139.          Top             =   780
  140.          Width           =   225
  141.       End
  142.       Begin Label HColors 
  143.          BackColor       =   &H00FF0000&
  144.          Height          =   225
  145.          Index           =   3
  146.          Left            =   450
  147.          TabIndex        =   23
  148.          Top             =   570
  149.          Width           =   225
  150.       End
  151.       Begin Label HColors 
  152.          BackColor       =   &H00FF00FF&
  153.          Height          =   225
  154.          Index           =   8
  155.          Left            =   930
  156.          TabIndex        =   22
  157.          Top             =   780
  158.          Width           =   225
  159.       End
  160.       Begin Label HColors 
  161.          BackColor       =   &H000080FF&
  162.          Height          =   225
  163.          Index           =   4
  164.          Left            =   690
  165.          TabIndex        =   21
  166.          Top             =   570
  167.          Width           =   225
  168.       End
  169.    End
  170.    Begin HScrollBar HScroll1 
  171.       Height          =   225
  172.       Index           =   2
  173.       Left            =   4800
  174.       Max             =   100
  175.       TabIndex        =   14
  176.       Top             =   2580
  177.       Width           =   2595
  178.    End
  179.    Begin Frame Frame2 
  180.       BackColor       =   &H00C0C0C0&
  181.       Caption         =   "KnobStyle"
  182.       FontBold        =   0   'False
  183.       FontItalic      =   0   'False
  184.       FontName        =   "MS Sans Serif"
  185.       FontSize        =   8.25
  186.       FontStrikethru  =   0   'False
  187.       FontUnderline   =   0   'False
  188.       Height          =   1275
  189.       Left            =   4020
  190.       TabIndex        =   10
  191.       Top             =   90
  192.       Width           =   1605
  193.       Begin OptionButton Option2 
  194.          BackColor       =   &H00C0C0C0&
  195.          Caption         =   "User"
  196.          Height          =   225
  197.          Index           =   3
  198.          Left            =   210
  199.          TabIndex        =   5
  200.          Top             =   900
  201.          Width           =   1005
  202.       End
  203.       Begin OptionButton Option2 
  204.          BackColor       =   &H00C0C0C0&
  205.          Caption         =   "Complex"
  206.          Height          =   225
  207.          Index           =   2
  208.          Left            =   210
  209.          TabIndex        =   4
  210.          Top             =   690
  211.          Width           =   1005
  212.       End
  213.       Begin OptionButton Option2 
  214.          BackColor       =   &H00C0C0C0&
  215.          Caption         =   "Pointer"
  216.          Height          =   225
  217.          Index           =   1
  218.          Left            =   210
  219.          TabIndex        =   12
  220.          Top             =   480
  221.          Width           =   1095
  222.       End
  223.       Begin OptionButton Option2 
  224.          BackColor       =   &H00C0C0C0&
  225.          Caption         =   "Circle"
  226.          Height          =   225
  227.          Index           =   0
  228.          Left            =   210
  229.          TabIndex        =   11
  230.          Top             =   270
  231.          Width           =   1125
  232.       End
  233.    End
  234.    Begin SELECTOR Selector1 
  235.       Angle           =   210
  236.       AutoAlign       =   -1  'True
  237.       AutoAngle       =   -1  'True
  238.       AutoAngleConfine=   0   'False
  239.       AutoOffset      =   -1  'True
  240.       AutoOffsetDistance=   0
  241.       AutoOffsetStyle =   0  ' 0 - Circular 
  242.       AutoRadius      =   0.8
  243.       AutoStartAngle  =   210
  244.       AutoStopAngle   =   330
  245.       AVersion        =   0
  246.       BackgroundColor =   &H00C0C0C0&
  247.       BevelInner      =   1  ' 1 - Raised
  248.       BevelOuter      =   2  ' 2 - Inset
  249.       BevelWidth      =   2
  250.       BorderType      =   1  ' 1 - Bevel
  251.       BorderWidth     =   2
  252.       FontID          =   0
  253.       FrameColor      =   &H00000000&
  254.       FrameScaleX     =   0
  255.       FrameScaleY     =   0
  256.       FrameStyle      =   0  ' 0 - None
  257.       Height          =   3465
  258.       Highlight       =   0   'False
  259.       HighlightColor  =   &H00000000&
  260.       KnobColor       =   &H00808080&
  261.       KnobOriginX     =   0
  262.       KnobOriginY     =   0
  263.       KnobRadius      =   0.6
  264.       KnobStyle       =   0  ' 0 - Cicular
  265.       KnobUserDefined =   "0,1000,  200,800,  150,700,  500,-600,  0,-500,  -500,-600,  -150,700,  -200,800"
  266.       Left            =   150
  267.       LineDisplay     =   0   'False
  268.       LineInnerRadius =   0.4
  269.       LineThickness   =   1
  270.       MarkUserDefined =   ""
  271.       MouseControl    =   -1  'True
  272.       OutlineAlign    =   0  ' 0 - Left 
  273.       OutlineColor    =   &H00000000&
  274.       OutlineTitle    =   ""
  275.       OutlineWidth    =   0
  276.       Radius          =   0
  277.       TabIndex        =   2
  278.       TabStop         =   0   'False
  279.       Top             =   120
  280.       Value           =   0
  281.       Width           =   3495
  282.       XScale          =   0
  283.       YScale          =   0
  284.       ZLoad           =   SEKNOBS.FRX:0000
  285.    End
  286.    Begin Label Label2 
  287.       AutoSize        =   -1  'True
  288.       BackStyle       =   0  'Transparent
  289.       Caption         =   " "
  290.       Height          =   195
  291.       Index           =   3
  292.       Left            =   7440
  293.       TabIndex        =   31
  294.       Top             =   2880
  295.       Width           =   270
  296.    End
  297.    Begin Label Label1 
  298.       Alignment       =   1  'Right Justify
  299.       AutoSize        =   -1  'True
  300.       BackStyle       =   0  'Transparent
  301.       Caption         =   "Value:"
  302.       FontBold        =   0   'False
  303.       FontItalic      =   0   'False
  304.       FontName        =   "MS Sans Serif"
  305.       FontSize        =   8.25
  306.       FontStrikethru  =   0   'False
  307.       FontUnderline   =   0   'False
  308.       Height          =   195
  309.       Index           =   3
  310.       Left            =   4305
  311.       TabIndex        =   30
  312.       Top             =   2880
  313.       Width           =   450
  314.    End
  315.    Begin Label Label2 
  316.       AutoSize        =   -1  'True
  317.       BackStyle       =   0  'Transparent
  318.       Caption         =   " "
  319.       Height          =   195
  320.       Index           =   1
  321.       Left            =   7440
  322.       TabIndex        =   3
  323.       Top             =   2280
  324.       Width           =   270
  325.    End
  326.    Begin Label Label1 
  327.       Alignment       =   1  'Right Justify
  328.       AutoSize        =   -1  'True
  329.       BackStyle       =   0  'Transparent
  330.       Caption         =   "KnobOriginY:"
  331.       FontBold        =   0   'False
  332.       FontItalic      =   0   'False
  333.       FontName        =   "MS Sans Serif"
  334.       FontSize        =   8.25
  335.       FontStrikethru  =   0   'False
  336.       FontUnderline   =   0   'False
  337.       Height          =   195
  338.       Index           =   1
  339.       Left            =   3825
  340.       TabIndex        =   15
  341.       Top             =   2280
  342.       Width           =   930
  343.    End
  344.    Begin Label Label2 
  345.       AutoSize        =   -1  'True
  346.       BackStyle       =   0  'Transparent
  347.       Caption         =   " "
  348.       Height          =   195
  349.       Index           =   0
  350.       Left            =   7440
  351.       TabIndex        =   27
  352.       Top             =   1980
  353.       Width           =   270
  354.    End
  355.    Begin Label Label1 
  356.       Alignment       =   1  'Right Justify
  357.       AutoSize        =   -1  'True
  358.       BackStyle       =   0  'Transparent
  359.       Caption         =   "KnobOriginX:"
  360.       FontBold        =   0   'False
  361.       FontItalic      =   0   'False
  362.       FontName        =   "MS Sans Serif"
  363.       FontSize        =   8.25
  364.       FontStrikethru  =   0   'False
  365.       FontUnderline   =   0   'False
  366.       Height          =   195
  367.       Index           =   0
  368.       Left            =   3825
  369.       TabIndex        =   26
  370.       Top             =   1980
  371.       Width           =   930
  372.    End
  373.    Begin Label Label1 
  374.       AutoSize        =   -1  'True
  375.       BackStyle       =   0  'Transparent
  376.       Caption         =   "KnobUserDefined: (x,y pair list for shape)"
  377.       FontBold        =   0   'False
  378.       FontItalic      =   0   'False
  379.       FontName        =   "MS Sans Serif"
  380.       FontSize        =   8.25
  381.       FontStrikethru  =   0   'False
  382.       FontUnderline   =   0   'False
  383.       Height          =   195
  384.       Index           =   4
  385.       Left            =   120
  386.       TabIndex        =   20
  387.       Top             =   3720
  388.       Width           =   2865
  389.    End
  390.    Begin Label Label2 
  391.       Alignment       =   2  'Center
  392.       AutoSize        =   -1  'True
  393.       BackStyle       =   0  'Transparent
  394.       Caption         =   " "
  395.       Height          =   195
  396.       Index           =   4
  397.       Left            =   1950
  398.       TabIndex        =   17
  399.       Top             =   3840
  400.       Width           =   90
  401.    End
  402.    Begin Label Label1 
  403.       Alignment       =   1  'Right Justify
  404.       AutoSize        =   -1  'True
  405.       BackStyle       =   0  'Transparent
  406.       Caption         =   "KnobRadius:"
  407.       FontBold        =   0   'False
  408.       FontItalic      =   0   'False
  409.       FontName        =   "MS Sans Serif"
  410.       FontSize        =   8.25
  411.       FontStrikethru  =   0   'False
  412.       FontUnderline   =   0   'False
  413.       Height          =   195
  414.       Index           =   2
  415.       Left            =   3840
  416.       TabIndex        =   16
  417.       Top             =   2580
  418.       Width           =   915
  419.    End
  420.    Begin Label Label2 
  421.       AutoSize        =   -1  'True
  422.       BackStyle       =   0  'Transparent
  423.       Caption         =   " "
  424.       Height          =   195
  425.       Index           =   2
  426.       Left            =   7440
  427.       TabIndex        =   13
  428.       Top             =   2580
  429.       Width           =   270
  430.    End
  431. End
  432.  
  433. Sub Check1_Click ()
  434.  
  435.     selector1.MouseControl = check1
  436.  
  437. End Sub
  438.  
  439. Sub Form_Load ()
  440.  
  441.     hscroll1(0) = selector1.KnobOriginX * 100
  442.     hscroll1(1) = selector1.KnobOriginY * 100
  443.     hscroll1(2) = selector1.KnobRadius * 100
  444.     label2(0) = selector1.KnobOriginX
  445.     label2(1) = selector1.KnobOriginY
  446.     label2(2) = selector1.KnobRadius
  447.     label2(3) = selector1.Value
  448.     
  449.     check1 = -selector1.MouseControl
  450.     
  451.     option2(selector1.KnobStyle) = True
  452.     text1 = selector1.KnobUserDefined
  453.  
  454. End Sub
  455.  
  456. Sub HColors_Click (index As Integer)
  457.  
  458.     selector1.KnobColor = HColors(index).BackColor
  459.  
  460. End Sub
  461.  
  462. Sub HScroll1_Change (index As Integer)
  463.  
  464.     Select Case index
  465.         Case 0
  466.             selector1.KnobOriginX = hscroll1(0) / 100
  467.             label2(0) = hscroll1(0) / 100
  468.         Case 1
  469.             selector1.KnobOriginY = hscroll1(1) / 100
  470.             label2(1) = hscroll1(1) / 100
  471.         Case 2
  472.             selector1.KnobRadius = hscroll1(2) / 100
  473.             label2(2) = hscroll1(2) / 100
  474.         Case 3
  475.             selector1.Value = hscroll1(3)
  476.             label2(3) = hscroll1(3)
  477.     End Select
  478.  
  479. End Sub
  480.  
  481. Sub HScroll1_Scroll (index As Integer)
  482.  
  483.     Select Case index
  484.         Case 0
  485.             selector1.KnobOriginX = hscroll1(0) / 100
  486.             label2(0) = hscroll1(0) / 100
  487.         Case 1
  488.             selector1.KnobOriginY = hscroll1(1) / 100
  489.             label2(1) = hscroll1(1) / 100
  490.         Case 2
  491.             selector1.KnobRadius = hscroll1(2) / 100
  492.             label2(2) = hscroll1(2) / 100
  493.         Case 3
  494.             selector1.Value = hscroll1(3)
  495.             label2(3) = hscroll1(3)
  496.     End Select
  497.  
  498. End Sub
  499.  
  500. Sub Option2_Click (index As Integer)
  501.  
  502.     selector1.KnobStyle = index
  503.  
  504. End Sub
  505.  
  506. Sub Text1_Change ()
  507.     
  508.     selector1.KnobUserDefined = text1
  509.  
  510. End Sub
  511.  
  512.